home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_300 / 343_02 / mof.c < prev    next >
Text File  |  1990-08-16  |  1KB  |  41 lines

  1.  
  2.  
  3.            /******************************************************
  4.            *
  5.            *       file d:\cips\mof.c
  6.            *
  7.            *       Functions: This file contains
  8.            *          my_open
  9.            *
  10.            *       Purpose: This function opens a file. Borland's
  11.            *          Turbo C opens files a little different from
  12.            *          the standard UNIX C. Instead of using this
  13.            *          different method in a number of various files,
  14.            *          the method is placed in this one file. If the
  15.            *          programs are moved to another system, all changes
  16.            *          will be located in this one place.
  17.            *
  18.            *       External Calls:
  19.            *          none
  20.            *
  21.            *       Modifications:
  22.            *          18 June 1987 - created
  23.            *
  24.            ****************************************************/
  25.  
  26.  
  27. #include "d:\cips\cips.h"
  28.  
  29. my_open(file_name)
  30.    char file_name[];
  31. {
  32.    int file_descriptor;
  33.  
  34.    file_descriptor = open(file_name, O_RDWR | O_CREAT | O_BINARY, 
  35.                           S_IWRITE);
  36.  
  37.    return(file_descriptor);
  38.  
  39.  
  40. }  /* ends my_open  */
  41.